function SrvEvent(params){ 
	 
}

SrvEvent.Where = function(type,proxy){
	this.type = type;
	this.proxy=proxy;
	this.linked = null;
	this.set = null;
	if(this.type==0){
		this.set = new SrvEvent.Where(1,true);
		this.set.linked = this;
	}
	this.getProxy = function(){
		var m = new SrvEvent.Where(this.type);//当前的对像
		if(this.type==0){
			m.set = new SrvEvent.Where(1,true);//set对象
			m.set.linked = m;
		}else{
			m.linked=this.linked;
			this.linked.linked=m;
		}
		return m;
	}
	this.data = {};
	this.put = function(key,value){
		this.data[key] = value;
	}
	this.get = function(key){
		return this.data[key];
	}
	
	
	/** 编号 [非空]       **/
	this.seId=function(seId){if(this.proxy)return this.getProxy().seId(seId);  this.put("seId", seId);return this;};
	/** and se_id is null */
	this.seIdNull=function(){if(this.proxy)return this.getProxy().seIdNull();if(this.get("seIdNot")==null)this.put("seIdNot", "");this.put("seId", null);return this;};
	/** not .... */
	this.seIdNot=function(){if(this.proxy)return this.getProxy().seIdNot();this.put("seIdNot", "not");return this;};
	this.seIdNotNull=function(){if(this.proxy)return this.getProxy().seIdNotNull();this.put("seIdNot", "not");this.put("seId", null);return this;};
	this.seIdNot=function(seId){if(this.proxy)return this.getProxy().seIdNot(seId);this.put("seIdNot", "not");this.put("seId", seId);return this;};
		
	/** and se_id <= ? */
	this.seIdMin=function(min){if(this.proxy)return this.getProxy().seIdMin(min);this.put("seIdMin", min);return this;};
	/** and se_id >= ? */
	this.seIdMax=function(max){if(this.proxy)return this.getProxy().seIdMax(max);this.put("seIdMax", max);return this;};
		
		
	this.seIdIn=function(ids){
		if(this.proxy)return this.getProxy().seIdIn(ids);  this.put("seIdIn", ids);return this;
	};	
		 
	
	
	/** 事件内容 [非空]       **/
	this.seContent=function(seContent){if(this.proxy)return this.getProxy().seContent(seContent);  this.put("seContent", seContent);return this;};
	/** and se_content is null */
	this.seContentNull=function(){if(this.proxy)return this.getProxy().seContentNull();if(this.get("seContentNot")==null)this.put("seContentNot", "");this.put("seContent", null);return this;};
	/** not .... */
	this.seContentNot=function(){if(this.proxy)return this.getProxy().seContentNot();this.put("seContentNot", "not");return this;};
	this.seContentNotNull=function(){if(this.proxy)return this.getProxy().seContentNotNull();this.put("seContentNot", "not");this.put("seContent", null);return this;};
	this.seContentNot=function(seContent){if(this.proxy)return this.getProxy().seContentNot(seContent);this.put("seContentNot", "not");this.put("seContent", seContent);return this;};
		
		 
	
	
	/** 事件类型 [非空] [SrvEventType]      **/
	this.seType=function(seType){if(this.proxy)return this.getProxy().seType(seType);  this.put("seType", seType);return this;};
	/** and se_type is null */
	this.seTypeNull=function(){if(this.proxy)return this.getProxy().seTypeNull();if(this.get("seTypeNot")==null)this.put("seTypeNot", "");this.put("seType", null);return this;};
	/** not .... */
	this.seTypeNot=function(){if(this.proxy)return this.getProxy().seTypeNot();this.put("seTypeNot", "not");return this;};
	this.seTypeNotNull=function(){if(this.proxy)return this.getProxy().seTypeNotNull();this.put("seTypeNot", "not");this.put("seType", null);return this;};
	this.seTypeNot=function(seType){if(this.proxy)return this.getProxy().seTypeNot(seType);this.put("seTypeNot", "not");this.put("seType", seType);return this;};
		
		
	this.seTypeIn=function(ids){
		if(this.proxy)return this.getProxy().seTypeIn(ids);  this.put("seTypeIn", ids);return this;
	};	
		 
	
	
	/** 数据标识        **/
	this.seDataId=function(seDataId){if(this.proxy)return this.getProxy().seDataId(seDataId);  this.put("seDataId", seDataId);return this;};
	/** and se_data_id is null */
	this.seDataIdNull=function(){if(this.proxy)return this.getProxy().seDataIdNull();if(this.get("seDataIdNot")==null)this.put("seDataIdNot", "");this.put("seDataId", null);return this;};
	/** not .... */
	this.seDataIdNot=function(){if(this.proxy)return this.getProxy().seDataIdNot();this.put("seDataIdNot", "not");return this;};
	this.seDataIdNotNull=function(){if(this.proxy)return this.getProxy().seDataIdNotNull();this.put("seDataIdNot", "not");this.put("seDataId", null);return this;};
	this.seDataIdNot=function(seDataId){if(this.proxy)return this.getProxy().seDataIdNot(seDataId);this.put("seDataIdNot", "not");this.put("seDataId", seDataId);return this;};
		
		 
	
	
	/** 处理地址        **/
	this.seUrl=function(seUrl){if(this.proxy)return this.getProxy().seUrl(seUrl);  this.put("seUrl", seUrl);return this;};
	/** and se_url is null */
	this.seUrlNull=function(){if(this.proxy)return this.getProxy().seUrlNull();if(this.get("seUrlNot")==null)this.put("seUrlNot", "");this.put("seUrl", null);return this;};
	/** not .... */
	this.seUrlNot=function(){if(this.proxy)return this.getProxy().seUrlNot();this.put("seUrlNot", "not");return this;};
	this.seUrlNotNull=function(){if(this.proxy)return this.getProxy().seUrlNotNull();this.put("seUrlNot", "not");this.put("seUrl", null);return this;};
	this.seUrlNot=function(seUrl){if(this.proxy)return this.getProxy().seUrlNot(seUrl);this.put("seUrlNot", "not");this.put("seUrl", seUrl);return this;};
		
		 
	
	
	/** 受理人员  [SrvUser]     /admin/permissions/user.query.do **/
	this.seUser=function(seUser){if(this.proxy)return this.getProxy().seUser(seUser);  this.put("seUser", seUser);return this;};
	/** and se_user is null */
	this.seUserNull=function(){if(this.proxy)return this.getProxy().seUserNull();if(this.get("seUserNot")==null)this.put("seUserNot", "");this.put("seUser", null);return this;};
	/** not .... */
	this.seUserNot=function(){if(this.proxy)return this.getProxy().seUserNot();this.put("seUserNot", "not");return this;};
	this.seUserNotNull=function(){if(this.proxy)return this.getProxy().seUserNotNull();this.put("seUserNot", "not");this.put("seUser", null);return this;};
	this.seUserNot=function(seUser){if(this.proxy)return this.getProxy().seUserNot(seUser);this.put("seUserNot", "not");this.put("seUser", seUser);return this;};
		
		
	this.seUserIn=function(ids){
		if(this.proxy)return this.getProxy().seUserIn(ids);  this.put("seUserIn", ids);return this;
	};	
		 
	
	
	/** 修改时间 [非空]       **/
	this.seUpdateTime=function(seUpdateTime){if(this.proxy)return this.getProxy().seUpdateTime(seUpdateTime);  this.put("seUpdateTime", seUpdateTime);return this;};
	/** and se_update_time is null */
	this.seUpdateTimeNull=function(){if(this.proxy)return this.getProxy().seUpdateTimeNull();if(this.get("seUpdateTimeNot")==null)this.put("seUpdateTimeNot", "");this.put("seUpdateTime", null);return this;};
	/** not .... */
	this.seUpdateTimeNot=function(){if(this.proxy)return this.getProxy().seUpdateTimeNot();this.put("seUpdateTimeNot", "not");return this;};
	this.seUpdateTimeNotNull=function(){if(this.proxy)return this.getProxy().seUpdateTimeNotNull();this.put("seUpdateTimeNot", "not");this.put("seUpdateTime", null);return this;};
	this.seUpdateTimeNot=function(seUpdateTime){if(this.proxy)return this.getProxy().seUpdateTimeNot(seUpdateTime);this.put("seUpdateTimeNot", "not");this.put("seUpdateTime", seUpdateTime);return this;};
		
	/** and se_update_time >= ? */
	this.seUpdateTimeStart=function(start){if(this.proxy)return this.getProxy().seUpdateTimeStart(start);this.put("seUpdateTimeStart", start);return this;};			
	/** and se_update_time <= ? */
	this.seUpdateTimeEnd=function(end){if(this.proxy)return this.getProxy().seUpdateTimeEnd(end);this.put("seUpdateTimeEnd", end);return this;};
		
		 
	
	
	/** 添加时间 [非空]       **/
	this.seAddTime=function(seAddTime){if(this.proxy)return this.getProxy().seAddTime(seAddTime);  this.put("seAddTime", seAddTime);return this;};
	/** and se_add_time is null */
	this.seAddTimeNull=function(){if(this.proxy)return this.getProxy().seAddTimeNull();if(this.get("seAddTimeNot")==null)this.put("seAddTimeNot", "");this.put("seAddTime", null);return this;};
	/** not .... */
	this.seAddTimeNot=function(){if(this.proxy)return this.getProxy().seAddTimeNot();this.put("seAddTimeNot", "not");return this;};
	this.seAddTimeNotNull=function(){if(this.proxy)return this.getProxy().seAddTimeNotNull();this.put("seAddTimeNot", "not");this.put("seAddTime", null);return this;};
	this.seAddTimeNot=function(seAddTime){if(this.proxy)return this.getProxy().seAddTimeNot(seAddTime);this.put("seAddTimeNot", "not");this.put("seAddTime", seAddTime);return this;};
		
	/** and se_add_time >= ? */
	this.seAddTimeStart=function(start){if(this.proxy)return this.getProxy().seAddTimeStart(start);this.put("seAddTimeStart", start);return this;};			
	/** and se_add_time <= ? */
	this.seAddTimeEnd=function(end){if(this.proxy)return this.getProxy().seAddTimeEnd(end);this.put("seAddTimeEnd", end);return this;};
		
		 
	
	
	/** 状态 [非空]   0:默认 1:锁定     **/
	this.seStatus=function(seStatus){if(this.proxy)return this.getProxy().seStatus(seStatus);  this.put("seStatus", seStatus);return this;};
	/** and se_status is null */
	this.seStatusNull=function(){if(this.proxy)return this.getProxy().seStatusNull();if(this.get("seStatusNot")==null)this.put("seStatusNot", "");this.put("seStatus", null);return this;};
	/** not .... */
	this.seStatusNot=function(){if(this.proxy)return this.getProxy().seStatusNot();this.put("seStatusNot", "not");return this;};
	this.seStatusNotNull=function(){if(this.proxy)return this.getProxy().seStatusNotNull();this.put("seStatusNot", "not");this.put("seStatus", null);return this;};
	this.seStatusNot=function(seStatus){if(this.proxy)return this.getProxy().seStatusNot(seStatus);this.put("seStatusNot", "not");this.put("seStatus", seStatus);return this;};
		
		
	this.seStatusIn=function(ids){
		if(this.proxy)return this.getProxy().seStatusIn(ids);  this.put("seStatusIn", ids);return this;
	};	
		 
	
	
	
	this.add=function(key,value) {if(proxy)return proxy().add(key,value);this.put(key, value);return this;}
	this.desc=function(sql) {if(proxy)return proxy().desc(sql);this.put("desc", sql);return this;}
	this.asc=function(sql) {if(proxy)return proxy().asc(sql);this.put("asc", sql);return this;}
	this.definex=function(sql) {if(proxy)return proxy().definex(sql);this.put("definex", sql);return this;}
	
	/** 获取所有系统事件 **/
	this.list=function(size){
		this.data.size = size;
		var protocol = ux.ajax("/admin/systematic/event.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list)return protocol.data.list;
		return [];
	}
	/** 获取系统事件分页 **/
	this.page=function(page,size){
		this.data.size = size;
		this.data.page = page;
		var protocol = ux.ajax("/admin/systematic/event.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data)return data;
		return {list:[]};
	}
	/** 根据查询条件取系统事件 **/
	this.get=function(){
		this.data.size = 1;
		var protocol = ux.ajax("/admin/systematic/event.list.do",this.data);
		if(!protocol)return null;
		if(protocol.data && protocol.data.list && protocol.data.list.length==1)return protocol.data.list[0]; 
		return null;
	}
}

SrvEvent.get = function(id){
	var protocol = ux.ajax("/admin/systematic/event.get.do",{id:id});
	if(!protocol)return null;
	if(protocol.data)return protocol.data.srvEvent;
	return null;
}

SrvEvent.where = new SrvEvent.Where(0,true);